Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update eslint #2771

Merged
merged 4 commits into from
Apr 1, 2024
Merged

chore(deps): update eslint #2771

merged 4 commits into from
Apr 1, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 25, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@eslint-types/jsdoc (source) 48.2.0 -> 48.2.1 age adoption passing confidence
@eslint-types/typescript-eslint (source) 7.0.2 -> 7.2.0 age adoption passing confidence
@typescript-eslint/eslint-plugin (source) 7.2.0 -> 7.4.0 age adoption passing confidence
@typescript-eslint/parser (source) 7.2.0 -> 7.4.0 age adoption passing confidence
eslint-plugin-jsdoc 48.2.1 -> 48.2.2 age adoption passing confidence
eslint-plugin-vitest 0.3.26 -> 0.4.1 age adoption passing confidence

Release Notes

typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)

v7.4.0

Compare Source

🚀 Features
  • eslint-plugin: [consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata

  • eslint-plugin: [no-unnecessary-type-arguments] handle tagged templates

  • eslint-plugin: deprecate no-throw-literal and add a renamed only-throw-error

🩹 Fixes
  • eslint-plugin: [prefer-optional-chain] address multipart nullish checks false positive

  • eslint-plugin: [prefer-optional-chain] properly disambiguate between boolean and false

  • eslint-plugin: [no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside

❤️ Thank You
  • Abraham Guo
  • Brad Zacher
  • Josh Goldberg ✨
  • Kim Sang Du
  • Kirk Waiblinger
  • Marco Pasqualetti
  • YeonJuan

You can read about our versioning strategy and releases on our website.

v7.3.1

Compare Source

🩹 Fixes
  • eslint-plugin: [no-floating-promises] revert disable of ignoreVoid in strict config
❤️ Thank You
  • Josh Goldberg ✨

You can read about our versioning strategy and releases on our website.

v7.3.0

Compare Source

🚀 Features
  • eslint-plugin: [restrict-template-expressions] add allowArray option

  • eslint-plugin: add meta.docs.recommended setting for strict config options

  • eslint-plugin: add rule use-unknown-in-catch-callback-variables

  • eslint-plugin: [prefer-reduce-type-parameter] supports tuple, union, intersection

🩹 Fixes
  • correct engines.node constraints in package.json

  • eslint-plugin: [unbound-method] check method definition in object literal using longhand form

  • eslint-plugin: [consistent-type-imports] handle imports without specifiers

  • eslint-plugin: [no-redundant-type-constituents] incorrectly marks & string as redundant

  • eslint-plugin: [no-unnecessary-qualifier] handle merge namespace with enum

  • eslint-plugin: [no-unused-expressions] false negatives when using assertions

  • eslint-plugin: [ban-ts-comment] more accurate handling of multiline comments

  • eslint-plugin: [explicit-function-return-type, explicit-module-boundary-types] improved checking for allowHigherOrderFunctions option

  • eslint-plugin: [class-literal-property-style] ignore property assigned in constructor

  • eslint-plugin: [no-unnecessary-type-assertion] fix false negative for const variable declarations

❤️ Thank You
  • Abraham Guo
  • Alexu
  • Arka Pratim Chaudhuri
  • auvred
  • Derrick Isaacson
  • fnx
  • Josh Goldberg ✨
  • Kirk Waiblinger
  • Marta Cardoso
  • Michaël De Boey
  • Tristan Rasmussen
  • YeonJuan

You can read about our versioning strategy and releases on our website.

typescript-eslint/typescript-eslint (@​typescript-eslint/parser)

v7.4.0

Compare Source

v7.3.1

Compare Source

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

v7.3.0

Compare Source

🩹 Fixes
  • correct engines.node constraints in package.json
❤️ Thank You
  • Abraham Guo
  • Alexu
  • Arka Pratim Chaudhuri
  • auvred
  • Derrick Isaacson
  • fnx
  • Josh Goldberg ✨
  • Kirk Waiblinger
  • Marta Cardoso
  • Michaël De Boey
  • Tristan Rasmussen
  • YeonJuan

You can read about our versioning strategy and releases on our website.

gajus/eslint-plugin-jsdoc (eslint-plugin-jsdoc)

v48.2.2

Compare Source

Bug Fixes
veritem/eslint-plugin-vitest (eslint-plugin-vitest)

v0.4.1

Compare Source

Full Changelog: vitest-dev/eslint-plugin-vitest@v0.4.1...v0.4.1

Changes
  • Remove max-expect rule in favor of max-expects

v0.4.0

Compare Source

Bug Fixes

Full Changelog: vitest-dev/eslint-plugin-vitest@v0.4.0...v0.4.0


Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner March 25, 2024 01:10
@renovate renovate bot added c: dependencies Pull requests that adds/updates a dependency p: 1-normal Nothing urgent labels Mar 25, 2024
@renovate renovate bot added this to the vAnytime milestone Mar 25, 2024
Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 1db9d53
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/660ac9f6f754f8000871b0a6
😎 Deploy Preview https://deploy-preview-2771.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.93%. Comparing base (158cda6) to head (1db9d53).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2771      +/-   ##
==========================================
- Coverage   99.93%   99.93%   -0.01%     
==========================================
  Files        2960     2960              
  Lines      211726   211726              
  Branches      601      947     +346     
==========================================
- Hits       211592   211578      -14     
- Misses        130      148      +18     
+ Partials        4        0       -4     

see 6 files with indirect coverage changes

@renovate renovate bot force-pushed the renovate/eslint branch 2 times, most recently from 1f0a821 to 9f68dd3 Compare March 25, 2024 10:59
@ST-DDT
Copy link
Member

ST-DDT commented Mar 25, 2024

Is the failure expected or a bug?

@Shinigami92
Copy link
Member

Is the failure expected or a bug?

Need to evaluate on a big screen. Will hopefully do this around evening.

@renovate renovate bot force-pushed the renovate/eslint branch 2 times, most recently from a50eb4c to e6342e1 Compare March 25, 2024 22:42
@matthewmayer
Copy link
Contributor

matthewmayer commented Mar 27, 2024

Seems restrict-plus-operands is now on by default. Probably turn it off.

I see no big problem with code like

str += faker.number.int(9);

Error:

Operands of '+' operations must be a number or string. Got `string` + `number`           @typescript-eslint/restrict-plus-operands

@ST-DDT
Copy link
Member

ST-DDT commented Mar 27, 2024

Seems restrict-plus-operands is now on by default.

It is the default since v6.0, but the config options might have changed:

Probably turn it off.

Maybe we should just allow string number again:

'@typescript-eslint/restrict-plus-operands': [
      'error',
      {
        allowAny: false,
        allowBoolean: false,
        allowNullish: false,
        allowNumberAndString: true,
        allowRegExp: false,
      },
    ],

Does anybody know how the config merging works?
Does providing options overwrite any previously set configs for that rule or is it merged? aka do we have to specific the allowX: false explicitly.

@Shinigami92
Copy link
Member

Does anybody know how the config merging works?

This depends on how it is implemented. For example, this is the reason why we do option destruction like we do, cause otherwise we would fall into undefined => falsy fallbacks by accident.
If needed I can explain more in details later on bigger screen or meeting.

@renovate renovate bot force-pushed the renovate/eslint branch 8 times, most recently from b3958d4 to e8eee1c Compare April 1, 2024 09:05
@matthewmayer
Copy link
Contributor

seems

'@typescript-eslint/restrict-plus-operands': [
      'error',
      {
        allowNumberAndString: true
      },
    ],

is sufficient to override that case.

The other remaining error is

vi.spyOn(console, methodName as keyof typeof console)
faker/test/faker.spec.ts
  20:27  error  This assertion is unnecessary since it does not change the type of the expression  @typescript-eslint/no-unnecessary-type-assertion

I dont understand well enough what as keyof typeof console is doing to fix that one myself.

Copy link
Contributor Author

renovate bot commented Apr 1, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@ST-DDT
Copy link
Member

ST-DDT commented Apr 1, 2024

Thanks for having a look at this.


is sufficient to override that case.

To overwrite the config, yes, but it does also overwrite the stricter config from here:

https://github.com/typescript-eslint/typescript-eslint/blob/8051c3f84c2c9ffa2ba8dabfbcb4d2d69e65b708/packages/eslint-plugin/src/configs/strict-type-checked.ts#L77-L86

I restored the strict config except for that flag.

Can be checked with the pnpm eslint --print-config src/index.ts command.


I dont understand well enough what as keyof typeof console is doing to fix that one myself.

The cast is now redundant. I'm not sure why exactly, but it is safe to remove.

@ST-DDT ST-DDT requested review from a team April 1, 2024 14:58
@ST-DDT ST-DDT merged commit 2e97b52 into next Apr 1, 2024
20 checks passed
@ST-DDT ST-DDT deleted the renovate/eslint branch April 1, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: dependencies Pull requests that adds/updates a dependency p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants